#ifdef _WIN32

#include "win32_utils.h"
#include <windows.h>
#include <imm.h>

// 通过 raylib 获取窗口句柄（不直接包含 raylib.h）
extern "C" void* GetWindowHandle(void);

void DisableIME() {
    void* handle = GetWindowHandle();
    if (handle) {
        ImmAssociateContext((HWND)handle, NULL);
    }
}

void* GetNativeWindowHandle() {
    return GetWindowHandle();
}

void WinPressKey(unsigned char keyCode) {
    keybd_event(keyCode, 0, 0, 0);
    // std::this_thread::sleep_for(std::chrono::milliseconds(50));
    keybd_event(keyCode, 0, KEYEVENTF_KEYUP, 0);
}

void SetDPIAware(){
    SetProcessDPIAware();
}

#endif